home *** CD-ROM | disk | FTP | other *** search
/ Chip 1999 March / CHIP Turkiye Mart 1999.iso / araclar / Win98 / HTML-Tool / DWESD.EXE / data.z / behaviors.dcr / Standard_114_Show popup behavior.ls < prev    next >
Encoding:
Text File  |  1998-04-02  |  1.4 KB  |  28 lines

  1. property pStartTime, pPopupMember, pPopupSprite, pDelay
  2.  
  3. on mouseEnter me
  4.   set pStartTime to the timer
  5. end
  6.  
  7. on mouseWithin me
  8.   if (pStartTime + pDelay) < the timer then
  9.     set the member of sprite pPopupSprite to pPopupMember
  10.     set the loc of sprite pPopupSprite to the loc of sprite the spriteNum of me
  11.   else
  12.     set the loc of sprite pPopupSprite to point(-1000, -1000)
  13.   end if
  14. end
  15.  
  16. on mouseLeave me
  17.   set the loc of sprite pPopupSprite to point(-1000, -1000)
  18. end
  19.  
  20. on getPropertyDescriptionList
  21.   set p_list to [#pPopupMember: [#comment: "Member to show on popup:", #format: #graphic, #default: EMPTY], #pPopupSprite: [#comment: "Sprite with popup:", #format: #integer, #default: 60], #pDelay: [#comment: "Delay time (in ticks):", #format: #integer, #default: 0]]
  22.   return p_list
  23. end
  24.  
  25. on getBehaviorDescription
  26.   return "This behavior displays a tooltip popup after a slight pause when the mouse is over a sprite." & RETURN & RETURN & "For this to work, a placeholder sprite must be in the score, offscreen.  Specify the placeholder's channel number in the" && QUOTE && "Sprite with popup:" & QUOTE && "field." & RETURN & RETURN & "The popup's position is controlled by its registration point.  A good way to set it is to run the movie, rollover the sprite with the tooltip, and stop the movie when the tooltip appears.  It will be visible on the stage and you can edit the reg point in the paint window."
  27. end
  28.